
#include "opend.h"

/*
    This function is called by buf_args(), which is called by
    handle_request(). buf_args() has broken up the client's
    buffer into an argv[] style array, which we now process
*/
int cli_args(int argc, char ** argv)
{
    if (3 != argc || 0 != strcmp(argv[0], CL_OPEN))
    {
        strcpy(errmsg, "usage: <pathname> <flag>\n");
        return -1;
    }

    pathname = argv[1];
    oflag = atoi(argv[2]);
    return 0;
}
